home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Interactive 11 / CDROM11.iso / pc / win95 / 1.cab / shared.dir / 00382_DIALOG CALLING SCRIPTS.ls < prev    next >
Encoding:
Text File  |  1995-06-02  |  11.0 KB  |  374 lines

  1. on dialogOpen d
  2.   global gDialogWindow
  3.   if objectp(gDialogWindow) then
  4.     forget(gDialogWindow)
  5.   end if
  6.   set gDialogWindow to window "dw"
  7.   set the fileName of gDialogWindow to "Mdialogs.DIR"
  8.   set mywindowrect to rect(1, 1, 2, 2)
  9.   set the rect of gDialogWindow to mywindowrect
  10.   set the windowType of gDialogWindow to 2
  11.   set the modal of gDialogWindow to 1
  12.   set the titleVisible of gDialogWindow to 0
  13.   set the visible of gDialogWindow to 0
  14.   moveToBack(gDialogWindow)
  15.   open(gDialogWindow)
  16.   tell gDialogWindow
  17.     go(d)
  18.     set w to dialogwidth()
  19.     set ht to dialogHeight()
  20.   end tell
  21.   set h to the stageLeft + 320 - (w / 2)
  22.   set v to the stageTop + 240 - (ht / 2)
  23.   set mywindowrect to rect(h, v, h + w - 2, v + ht - 2)
  24.   set the rect of gDialogWindow to mywindowrect
  25.   set the visible of gDialogWindow to 1
  26.   moveToFront(gDialogWindow)
  27.   updateStage()
  28. end
  29.  
  30. on dialogClose
  31.   global gDialogWindow
  32.   if objectp(gDialogWindow) then
  33.     set the modal of gDialogWindow to 0
  34.     set the visible of gDialogWindow to 0
  35.     puppetSprite(48, 0)
  36.     forget(gDialogWindow)
  37.     updateStage()
  38.     if (the movie = "M08CHBKG.DIR") and (the frameLabel = "end") then
  39.       drawPaper()
  40.     end if
  41.   end if
  42. end
  43.  
  44. on timeOutResellerDialog
  45.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gAutoMode, gMainMovieName
  46.   if gDialogResult = EMPTY then
  47.     set gDialogCallback to "timeOutResellerDialog"
  48.     set gDialogResult to EMPTY
  49.     set gLastTimeoutScript to the timeoutScript
  50.     set gLastTimeoutLength to the timeoutLength
  51.     set the timeoutScript to EMPTY
  52.     set the timeoutLength to gDialogTimeout
  53.     set the timeoutScript to "goCloser"
  54.     if gAutoMode = 1 then
  55.       dialogOpen("d5")
  56.     else
  57.       dialogOpen("d5a")
  58.     end if
  59.   else
  60.     dialogClose()
  61.     set r to gDialogResult
  62.     set gDialogResult to EMPTY
  63.     set the timeoutScript to EMPTY
  64.     set the timeoutLength to 0
  65.     if r = "automatic" then
  66.       set gAutoMode to 1
  67.       set gTeaserMode to 0
  68.       clearTimeout()
  69.       if the movie = gMainMovieName then
  70.         clearMenuButtons()
  71.         selectSection("quick tour")
  72.       end if
  73.     else
  74.       if r = "interactive" then
  75.         set gAutoMode to 0
  76.         set gTeaserMode to 0
  77.         resetResellerTimeout()
  78.       else
  79.         if r = "restart" then
  80.           goCloser()
  81.           exit
  82.         end if
  83.       end if
  84.     end if
  85.   end if
  86. end
  87.  
  88. on exitDialog
  89.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gAutoMode, gResellerVersion, gLastScreen
  90.   if gDialogResult = EMPTY then
  91.     set gDialogCallback to "exitDialog"
  92.     set gDialogResult to EMPTY
  93.     set gLastTimeoutScript to the timeoutScript
  94.     set gLastTimeoutLength to the timeoutLength
  95.     set the timeoutScript to EMPTY
  96.     dialogOpen("d1")
  97.   else
  98.     dialogClose()
  99.     set r to gDialogResult
  100.     set gDialogResult to EMPTY
  101.     set the timeoutScript to EMPTY
  102.     set the timeoutLength to 0
  103.     if r = "exit" then
  104.       if gResellerVersion = 0 then
  105.         scanDialog()
  106.       else
  107.         goCloser()
  108.       end if
  109.     end if
  110.     set the timeoutScript to gLastTimeoutScript
  111.     set the timeoutLength to gLastTimeoutLength
  112.   end if
  113. end
  114.  
  115. on scanDialog
  116.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gScanExitFlag
  117.   if gDialogResult = EMPTY then
  118.     set gDialogCallback to "scanDialog"
  119.     set gDialogResult to EMPTY
  120.     set gLastTimeoutScript to the timeoutScript
  121.     set gLastTimeoutLength to the timeoutLength
  122.     set the timeoutScript to EMPTY
  123.     dialogOpen("d6")
  124.   else
  125.     dialogClose()
  126.     set r to gDialogResult
  127.     set gDialogResult to EMPTY
  128.     set the timeoutScript to EMPTY
  129.     set the timeoutLength to 0
  130.     if r = "exit" then
  131.       goCloser()
  132.       exit
  133.     else
  134.       if r = "scan" then
  135.         set gScanExitFlag to 3
  136.         goScan()
  137.         exit
  138.       end if
  139.     end if
  140.     set the timeoutScript to gLastTimeoutScript
  141.     set the timeoutLength to gLastTimeoutLength
  142.   end if
  143. end
  144.  
  145. on deleteFilesDialog
  146.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength
  147.   if gDialogResult = EMPTY then
  148.     set gDialogCallback to "deleteFilesDialog"
  149.     set gDialogResult to EMPTY
  150.     set gLastTimeoutScript to the timeoutScript
  151.     set gLastTimeoutLength to the timeoutLength
  152.     set the timeoutScript to EMPTY
  153.     dialogOpen("d2")
  154.   else
  155.     dialogClose()
  156.     set r to gDialogResult
  157.     set gDialogResult to EMPTY
  158.     set the timeoutScript to EMPTY
  159.     set the timeoutLength to 0
  160.     if r = "exit" then
  161.       doQuit()
  162.       exit
  163.     else
  164.       if r = "delete" then
  165.         deleteFilesDialog2()
  166.         exit
  167.       end if
  168.     end if
  169.     set the timeoutScript to gLastTimeoutScript
  170.     set the timeoutLength to gLastTimeoutLength
  171.   end if
  172. end
  173.  
  174. on deleteFilesDialog2
  175.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength
  176.   if gDialogResult = EMPTY then
  177.     set gDialogCallback to "deleteFilesDialog2"
  178.     set gDialogResult to EMPTY
  179.     set gLastTimeoutScript to the timeoutScript
  180.     set gLastTimeoutLength to the timeoutLength
  181.     set the timeoutScript to EMPTY
  182.     dialogOpen("d7")
  183.   else
  184.     dialogClose()
  185.     set r to gDialogResult
  186.     set gDialogResult to EMPTY
  187.     set the timeoutScript to EMPTY
  188.     set the timeoutLength to 5
  189.     if r = "exit" then
  190.       doQuit()
  191.       exit
  192.     end if
  193.     set the timeoutScript to gLastTimeoutScript
  194.     set the timeoutLength to gLastTimeoutLength
  195.     deleteFilesDialog()
  196.   end if
  197. end
  198.  
  199. on restartDialog
  200.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gResellerVersion
  201.   timeOutResellerDialog()
  202.   exit
  203.   if gDialogResult = EMPTY then
  204.     if gResellerVersion = 1 then
  205.       timeOutResellerDialog()
  206.       exit
  207.     end if
  208.     set gDialogCallback to "restartDialog"
  209.     set gDialogResult to EMPTY
  210.     set gLastTimeoutScript to the timeoutScript
  211.     set gLastTimeoutLength to the timeoutLength
  212.     set the timeoutScript to EMPTY
  213.     set the timeoutLength to gDialogTimeout
  214.     set the timeoutScript to "goCloser"
  215.     dialogOpen("d4")
  216.   else
  217.     dialogClose()
  218.     set r to gDialogResult
  219.     set gDialogResult to EMPTY
  220.     set the timeoutScript to EMPTY
  221.     set the timeoutLength to 0
  222.     if r = "exit" then
  223.       goCloser()
  224.       exit
  225.     else
  226.       if r = "restart" then
  227.         goRestart()
  228.         exit
  229.       end if
  230.     end if
  231.     set the timeoutScript to gLastTimeoutScript
  232.     set the timeoutLength to gLastTimeoutLength
  233.   end if
  234. end
  235.  
  236. on AutoDecisionDialog
  237.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gResellerVersion, gMainMovieName, gAutoMode, gTeaserMode
  238.   if gDialogResult = EMPTY then
  239.     set gDialogCallback to "AutoDecisionDialog"
  240.     set gDialogResult to EMPTY
  241.     set gLastTimeoutScript to the timeoutScript
  242.     set gLastTimeoutLength to the timeoutLength
  243.     set the timeoutScript to EMPTY
  244.     if gResellerVersion = 1 then
  245.       set the timeoutLength to gDialogTimeout
  246.       set the timeoutScript to "chooseTeaserDemo"
  247.     end if
  248.     dialogOpen("d5")
  249.   else
  250.     dialogClose()
  251.     set r to gDialogResult
  252.     set gDialogResult to EMPTY
  253.     if r = "interactive" then
  254.       set gAutoMode to 0
  255.       set gTeaserMode to 0
  256.       if gResellerVersion = 1 then
  257.         resetResellerTimeout()
  258.       else
  259.         set the timeoutScript to gLastTimeoutScript
  260.         set the timeoutLength to gLastTimeoutLength
  261.       end if
  262.       exit
  263.     else
  264.       if r = "restart" then
  265.         goRestart()
  266.         exit
  267.       else
  268.         set the timeoutScript to gLastTimeoutScript
  269.         set the timeoutLength to gLastTimeoutLength
  270.       end if
  271.     end if
  272.   end if
  273. end
  274.  
  275. on timeOutDialog
  276.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength
  277.   if gDialogResult = EMPTY then
  278.     set gDialogCallback to "timeOutDialog"
  279.     set gDialogResult to EMPTY
  280.     set gLastTimeoutScript to the timeoutScript
  281.     set gLastTimeoutLength to the timeoutLength
  282.     set the timeoutScript to EMPTY
  283.     set the timeoutLength to gDialogTimeout
  284.     set the timeoutScript to "goCloser"
  285.     dialogOpen("d5")
  286.   else
  287.     dialogClose()
  288.     set r to gDialogResult
  289.     set gDialogResult to EMPTY
  290.     set the timeoutScript to EMPTY
  291.     set the timeoutLength to 0
  292.     if r = "exit" then
  293.       goCloser()
  294.       exit
  295.     else
  296.       if r = "restart" then
  297.         goRestart()
  298.         exit
  299.       end if
  300.     end if
  301.     set the timeoutScript to gLastTimeoutScript
  302.     set the timeoutLength to gLastTimeoutLength
  303.   end if
  304. end
  305.  
  306. on endAutoDemoDialog
  307.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gResellerVersion
  308.   if gDialogResult = EMPTY then
  309.     set gDialogCallback to "endAutoDemoDialog"
  310.     set gDialogResult to EMPTY
  311.     set gLastTimeoutScript to the timeoutScript
  312.     set gLastTimeoutLength to the timeoutLength
  313.     set the timeoutScript to EMPTY
  314.     if gResellerVersion = 1 then
  315.       set the timeoutLength to gDialogTimeout
  316.       set the timeoutScript to "goCloser"
  317.     end if
  318.     dialogOpen("d3")
  319.   else
  320.     dialogClose()
  321.     set r to gDialogResult
  322.     set gDialogResult to EMPTY
  323.     set the timeoutScript to EMPTY
  324.     set the timeoutLength to 0
  325.     if r = "exit" then
  326.       exitDialog()
  327.       exit
  328.     else
  329.       if r = "restart" then
  330.         goRestart()
  331.         exit
  332.       end if
  333.     end if
  334.     set the timeoutScript to gLastTimeoutScript
  335.     set the timeoutLength to gLastTimeoutLength
  336.   end if
  337. end
  338.  
  339. on endAutoDemoDialogReseller
  340.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gResellerVersion
  341.   if gDialogResult = EMPTY then
  342.     set gDialogCallback to "endAutoDemoDialogReseller"
  343.     set gDialogResult to EMPTY
  344.     set gLastTimeoutScript to the timeoutScript
  345.     set gLastTimeoutLength to the timeoutLength
  346.     set the timeoutScript to EMPTY
  347.     if gResellerVersion = 1 then
  348.       set the timeoutLength to gDialogTimeout
  349.       set the timeoutScript to "goCloser"
  350.     end if
  351.     dialogOpen("d9")
  352.   else
  353.     dialogClose()
  354.     set r to gDialogResult
  355.     set gDialogResult to EMPTY
  356.     set the timeoutScript to EMPTY
  357.     set the timeoutLength to 0
  358.     if r = "menu" then
  359.       set gAutoMode to 0
  360.       set gTeaserMode to 0
  361.       resetResellerTimeout()
  362.       goMenu()
  363.       exit
  364.     else
  365.       if r = "restart" then
  366.         goRestart()
  367.         exit
  368.       end if
  369.     end if
  370.     set the timeoutScript to gLastTimeoutScript
  371.     set the timeoutLength to gLastTimeoutLength
  372.   end if
  373. end
  374.